<?php
/*
 * BorderWaitMaps
 * 
 * Copyright 2007 - Fraser Moffatt
 * 
 */

ini_set('display_errors', 'On');
ini_set('error_reporting', E_ERROR );

include_once("bootstrap.inc.php");
require_once("com/borderwaitmaps/json/JSONRequestHandler.php");

// the incoming query is a URLencoded version of a JSONized string
// for instance...
// {"request":"getBorderCrossings","class":"BorderCrossings","data":{"limit":"500"}}
$query = $_SERVER["QUERY_STRING"];

// hand it to the JSONServlet
$servlet = new JSONRequestHandler($query);

// execute command, serialized with JSON
$result = $servlet->execute();

// this is JSONized
print_r ( $result );

?>

